<?php

use Faker\Generator as Faker;
use App\User;
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| This directory should contain each of the model factory definitions for
| your application. Factories provide a convenient way to generate new
| model instances for testing / seeding your application's database.
|
*/
//批量填充工厂
$factory->define(User::class, function (Faker $faker) {
    return [
        'username' => $faker->name,
        // 'email' => str_random(10).'@cdblog.xin',
        'email' => $faker->unique()->safeEmail,
        'password' => bcrypt('admin888'),
        'status' => 0,
        'email_token'=>bcrypt(str_random(10)),
    ];
});
